<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <canvas id="canvas" width="800" height="800"></canvas>

  <script>
    const canvasDom = document.getElementById('canvas')
    const drawer = canvasDom.getContext('2d')

    let index = 0;
    let radianGradient = drawer.createRadialGradient(300, 200, 0, 300, 200, 100);
    
    radianGradient.addColorStop(0, 'red')
    radianGradient.addColorStop(0.3, '#fffccc')
    radianGradient.addColorStop(1, 'blue')
    drawer.fillStyle = radianGradient
    // drawer.fillRect(0, 0, 600, 400)

    drawer.arc(300, 200, 100, 0, Math.PI * 2)
    drawer.fill();
  </script>
</body>

</html>